package Testdmo4;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 水仙花数
 * User:周次煜
 * Date: 2024-03-15
 * Time：10:55
 */
public class Test4 {

    public static void main(String[] args) {

        for (int n = 100; n < 1000; n++) {
            int a=n%10,b=n/100,c=n/10%10;
            if (Math.pow(a,3)+Math.pow(b,3)+Math.pow(c,3)==n) {
                System.out.print(n+" ");
            }

        }
    }
}
